package com.example.administrator.School.common.result;

import java.util.List;
import java.util.Map;

/**
 * 前后台数据接口类
 * 
 * @author ChrisWong
 *
 */
public class BaseResult<T> implements IResult {

  private static final long serialVersionUID = 1L;

  /**
   * 返回结果：0成功，其他的失败
   */
  protected String code = "";

  /**
   * 返回消息：结果为其他时存放失败原因
   */
  protected String msg = "";

  /**
   * 返回结果：对象
   */
  protected List<T> data = null;

  protected List<T> results = null;
  /**
   * 返回结果：对象
   */
  protected Map user = null;
//  /**
//   * 返回结果：列表
//   */
//  protected List<T> list = null;
  protected String token=null;

  protected String type=null;

  protected String message=null;

  protected String status=null;
  protected String info;

  public String getInfo() {
    return info;
  }

  public void setInfo(String info) {
    this.info = info;
  }

  public List<T> getPois() {
    return pois;
  }

  public void setPois(List<T> pois) {
    this.pois = pois;
  }

  protected List<T> pois;
  /**
   * 
   * @param code 返回结果：0成功，其他失败
   * @param msg 返回消息：结果为0时存放失败原因
   * @param data 返回结果：对象
   */
  public BaseResult(String code, String msg, List<T> data, Map user,String token,String type,String message,List<T> results,String status) {
    this.code = code;
    this.msg = msg;
    this.data = data;
    this.user = user;
    this.token = token;
    this.type = type;
    this.message = message;
    this.results = results;
    this.status = status;
  }

//  /**
//   *
//   * @param result 返回结果：1成功，0失败
//   * @param message 返回消息：结果为0时存放失败原因
//   * @param list 返回结果：列表
//   */
//  public BaseResult(String result, String message, List<T> list) {
//    this.result = result;
//    this.message = message;
//    this.list = list;
//  }


  public String getCode() {
    return code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  public String getMsg() {
    return msg;
  }

  public void setMsg(String msg) {
    this.msg = msg;
  }

  public List<T> getData() {
    return data;
  }

  public void setData(List<T> rows) {
    this.data = data;
  }

  public Map getUser() {
    return user;
  }

  public void setUser(Map user) {
    this.user = user;
  }
  //  public List<T> getList() {
//    return list;
//  }
//
//  public void setList(List<T> list) {
//    this.list = list;
//  }


  public String getToken() {
    return token;
  }

  public void setToken(String token) {
    this.token = token;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public List<T> getResults() {
    return results;
  }

  public void setResults(List<T> results) {
    this.results = results;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }
}
